#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void print_arr(int arr[], int sz) {
	for (int i = 0; i < sz; i++) {
		printf("%d ", arr[i]);
	}
	printf("\n");
}

int compar_int(const void* p1, const void* p2) {
	return ((*((int*)p1) - (*((int*)p2))));
}

int main() {
	int  arr[10] = { 1,2,4,3,5,7,6,8,10,9 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	int width = sizeof(arr[0]);

	print_arr(arr, sz);
	qsort(arr, sz, width, compar_int);
	print_arr(arr, sz);
	return 0;
}